package org.dei.perla.sys.console;

import org.dei.perla.sys.console.ConsoleMessage.*;

public class TestClient {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ConsoleClient CC = new ConsoleClient();
		CC.connectTo("127.0.0.1", 14567);	
		
		
		String richiesta = new String("CREATE STREAM TemperaturesInZ (temperature FLOAT) AS LOW: EVERY 30 s SELECT AVG(temp, 30 s) SAMPLING EVERY 0.5 s");
		String risposta = CC.request(PerLaRequest.CommandType.TEST_QUERY, richiesta);
		System.out.println("Risposta dal server: "+risposta + "\n\n");
		
		
		System.out.println("Il client ha terminato e chiude.");		
		CC.disconnect();
	}

}
